#include <iostream>
#include <vector>
using namespace std;
//#define ll long long
int main() {
    int n,L,r,t;
    int ans=0;
    cin>>n>>L>>r>>t;
    vector<vector<int>> v(n+1,vector<int>(n+1));
    vector<vector<int>> sum(n+1,vector<int>(n+1));
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            cin>>v[i][j];
            sum[i][j]=sum[i][j-1]+sum[i-1][j]-sum[i-1][j-1]+v[i][j];
        }
    }
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            int left=max(1,j-r);
            int right=min(n,j+r);
            int up=max(1,i-r);
            int down=min(n,i+r);
            //元素个数
            int count=(right-left+1)*(down-up+1);
            //邻域元素和,注意边界
            int temp=sum[down][right]+sum[up-1][left-1]-sum[up-1][right]-sum[down][left-1];
            if(temp<=t*count) ans++;
        }
    }
    cout<<ans;
    return 0;
}
